using AtomicCms.Common.Entities;
using AtomicCms.Common.Extensions;
using AtomicCms.Common.Models;
using NUnit.Framework;

namespace AtomicCms.Tests.Extensions
{
    [TestFixture]
    public class TagCountExtensionBehavior
    {
        [Test]
        public void Should_return_tag1_if_Less_or_equal_to_1()
        {
            TagCount tc = new TagCount() {Tag = new CmsTag(), Count = 3};
            Assert.AreEqual("tag1", tc.GetTagClass(1000));
        }

        [Test]
        public void Should_return_tag2_if_Less_or_equal_to_4()
        {
            TagCount tc = new TagCount() { Tag = new CmsTag(), Count = 3 };
            Assert.AreEqual("tag2", tc.GetTagClass(100));
            tc = new TagCount() { Tag = new CmsTag(), Count = 4 };
            Assert.AreEqual("tag2", tc.GetTagClass(100));
        }
        
        [Test]
        public void Should_return_tag6_if_Less_or_equal_to_30_and_greater_than_18()
        {
            TagCount tc = new TagCount() { Tag = new CmsTag(), Count = 29 };
            Assert.AreEqual("tag6", tc.GetTagClass(100));
            tc = new TagCount() { Tag = new CmsTag(), Count = 20 };
            Assert.AreEqual("tag6", tc.GetTagClass(100));
        }

    }
}